Skip to content

engine/schema: add upgrade path for source 4.11.2.0 version#3417

Merged
yadvr merged 2 commits intoapache:4.11from
shapeblue:41120-upgrade-bug-fix
Jun 25, 2019
Merged

engine/schema: add upgrade path for source 4.11.2.0 version#3417
yadvr merged 2 commits intoapache:4.11from
shapeblue:41120-upgrade-bug-fix

Conversation

@yadvr
Copy link
Member

@yadvr yadvr commented Jun 23, 2019

This adds a missing upgrade path for source version 4.11.2.0. Without
this fix, 4.11.2.0 users won't be able to upgrade to 4.11.3.0.

The issue for 4.11.2.0 users will be that the expected DB upgrade exception will not be thrown around the 4.11.3 systemvmtemplate checks and post-upgrade any registered 4.11.3.0 systemvmtemplate will not be automatically used for systemvms and VRs.

We couldn't catch the bug before because an explicit upgrade from 4.11.2.0 was not tested (at least by me).

Workaround: (based on https://github.com/apache/cloudstack/blob/4.11/engine/schema/src/com/cloud/upgrade/dao/Upgrade41120to41130.java#L156)

  • Set the 4.11.3 template to SYSTEM type
  • Update template ID for systemvms
  • Update the router.template.* for each hypervisor
  • Update minreq.sysvmtemplate.version to 4.11.3
  • Update template checksum (optional)

Mgmt log reference:

2019-06-24 12:35:26,589 INFO  [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) Grabbing lock to check for database upgrade.
2019-06-24 12:35:26,611 DEBUG [c.c.u.d.VersionDaoImpl] (main:null) (logid:) Checking to see if the database is at a version before it was the version table is created
2019-06-24 12:35:26,621 INFO  [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) DB version = 4.11.2.0 Code Version = 4.11.3.0
2019-06-24 12:35:26,621 INFO  [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) Database upgrade must be performed from 4.11.2.0 to 4.11.3.0
2019-06-24 12:35:26,623 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) Running upgrade NoopDbUpgrade to upgrade from 4.11.2.0-4.11.3.0 to 4.11.3.0
2019-06-24 12:35:26,640 INFO  [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) Cleanup upgrade NoopDbUpgrade to upgrade from 4.11.2.0-4.11.3.0 to 4.11.3.0
2019-06-24 12:35:26,663 DEBUG [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) Upgrade completed for version 4.11.3.0

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

yadvr added 2 commits June 24, 2019 00:03
This adds a missing upgrade path for source version 4.11.2.0. Without
this fix, 4.11.2.0 users won't be able to upgrade to 4.11.3.0.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This reverts commit 5bfad44 because
we'll need another RC on latest 4.11 branch towards 4.11.3.0.
@yadvr
Copy link
Member Author

yadvr commented Jun 24, 2019

@PaulAngus let's do a 4.11.3.1, or recall on 4.11.3.0 as it's not announced/published yet.
@blueorangutan test matrix

@blueorangutan
Copy link

@rhtyd a Trillian-Jenkins matrix job (centos6 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

@borisstoyanov
Copy link
Contributor

looks good, will check it out when we have Jenkins back up

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1

@apache apache deleted a comment from blueorangutan Jun 24, 2019
@yadvr
Copy link
Member Author

yadvr commented Jun 24, 2019

@blueorangutan test matrix

@blueorangutan
Copy link

@rhtyd a Trillian-Jenkins matrix job (centos6 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

Copy link
Contributor

@nvazquez nvazquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@PaulAngus
Copy link
Member

@blueorangutan test matrix

@blueorangutan
Copy link

@PaulAngus a Trillian-Jenkins matrix job (centos6 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-5)
Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
Total time taken: 24847 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3417-t5-xenserver-71.zip
Intermittent failure detected: /marvin/tests/smoke/test_scale_vm.py
Smoke tests completed. 68 look OK, 1 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_scale_vm Error 14.38 test_scale_vm.py

Copy link
Member

@GabrielBrascher GabrielBrascher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@blueorangutan
Copy link

Trillian test result (tid-8)
Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7
Total time taken: 32833 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3417-t8-vmware-65u2.zip
Smoke tests completed. 69 look OK, 0 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File

@yadvr
Copy link
Member Author

yadvr commented Jun 25, 2019

KVM env test failed due to backend IP-range issues, I've rekicked the test job.
Will merge this as soon as the KVM tests are in.

@blueorangutan
Copy link

Trillian test result (tid-12)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 29693 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3417-t12-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Smoke tests completed. 69 look OK, 0 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File

@yadvr yadvr merged commit 6f1fc18 into apache:4.11 Jun 25, 2019
@yadvr
Copy link
Member Author

yadvr commented Jun 25, 2019

@PaulAngus 4.11.3.0 RC2 can be cut now out of latest 4.11 branch. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants